import request from '@/utils/request'

//用户分页集合
export function getUserList(page,pageSize,userName,loginName,roleName,email,enabled) {
  return request({
    url: '/sys/SysUserController/systemManage/peopleManage/page',
    method: 'get',
    params : { page,pageSize,userName,loginName,roleName,email,enabled }
  })
}

//获取当前登录用户权限资源，用于生成路由及菜单
export function getUserInfo(id) {
  return request({
    url: '/sys/SysUserController/systemManage/peopleManage/getUserInfo',
    method: 'get',
    params : { id }
  })
}

//删除人员
export function delUser(data) {
  return request({
    url: '/sys/SysUserController/systemManage/peopleManage/delUser',
    method: 'post',
    data
  })
}

//修改人员
export function updateUser(data) {
  return request({
    url: '/sys/SysUserController/systemManage/peopleManage/updateUser',
    method: 'post',
    data
  })
}

//添加人员
export function addUser(data) {
  return request({
    url: '/sys/SysUserController/systemManage/peopleManage/addUser',
    method: 'post',
    data
  })
}